package events 
{
	import flash.events.Event;
	import com.lohika.Entity;
	import com.lohika.Entity;
	
	/**
	 * ...
	 * @author Vitaly Vrublevskyy
	 */
	public class EntityEvent extends Event 
	{
		public static const SELECT:String = "select";
		public static const ADDED:String = "added";
		public static const REMOVED:String = "removed";
		public static const REPLACED:String = "replaced";
		
		
		public var first:Entity;
		public var second:Entity;
		
		public function EntityEvent(type:String, first:Entity,  second:Entity = null, bubbles:Boolean=false, cancelable:Boolean=false) 
		{ 
			super(type, bubbles, cancelable);
			
			this.first = first;
			this.second = second;
			
		} 
		
		public override function clone():Event 
		{ 
			return new EntityEvent(type, first, second, bubbles, cancelable);
		} 
		
		public override function toString():String 
		{ 
			return formatToString("EntityEvent", "type", "first", "second", "bubbles", "cancelable", "eventPhase"); 
		}
		
	}
	
}